import request from '@/utils/request'

// 查询信访投诉列表
export function listLetter(query) {
  return request({
    url: '/visit/letter/list',
    method: 'get',
    params: query
  })
}

// 查询信访投诉详细
export function getLetter(lvId) {
  return request({
    url: '/visit/letter/' + lvId,
    method: 'get'
  })
}

// 新增信访投诉
export function addLetter(data) {
  return request({
    url: '/visit/letter',
    method: 'post',
    data: data
  })
}

// 修改信访投诉
export function updateLetter(data) {
  return request({
    url: '/visit/letter',
    method: 'put',
    data: data
  })
}

// 删除信访投诉
export function delLetter(lvId) {
  return request({
    url: '/visit/letter/' + lvId,
    method: 'delete'
  })
}

// 导出信访投诉
export function exportLetter(query) {
  return request({
    url: '/visit/letter/export',
    method: 'get',
    params: query
  })
}